<template>
  <div class="tabbar">
     <van-tabbar v-model="active" route>
      <van-tabbar-item icon="wap-home-o" @click="fun('/home')" >首页</van-tabbar-item>
      <van-tabbar-item icon="fire-o" @click="fun('/tuan')">爆爆团</van-tabbar-item>
      <van-tabbar-item icon="description" @click="fun('/order')">订单</van-tabbar-item>
      <van-tabbar-item icon="user-o" @click="fun('/mine')">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
    data() {
        return {
          active: 0,
        };
    },
    mounted(){
      console.log(this.$route.path);
    },
    methods:{
      fun(val){
        console.log(val);
        if(this.$route.path == val) return
        this.$router.push(val)
      }
    }
}
</script>

<style lang="scss" scoped>

</style>